package com.common.base;


import com.common.util.RedisUtil;
import org.springframework.beans.factory.annotation.Autowired;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;


public abstract class BaseController<S extends BaseService, E extends BaseEntity>{

    @Resource
    protected HttpServletRequest httpServletRequest;
    @Autowired(required=false)
    protected S service;
    @Resource
    protected RedisUtil redisUtil;

    public String token(){
        return httpServletRequest.getHeader(BaseConstant.tokenHeader);
    }

}
